<!-- 创建 / 更新计划 -->
{% extends 'task/_task.html' %}
{% from '_macros.html' import form_field_all with context %}
{% block ac_plan %} active actmore {% endblock %}


{% block top_bar %} 
<a class="btn btn-success" href="{{ url_for('.plans') }}">返回</a>
{% endblock %}


{% block show %}
<form method="post">
    {{ form_field_all(form) }}
</form>

{% if bind_tasknames %}
<p style="display: inline-block;">
    已绑定的任务：
    {% for taskname in bind_tasknames %}
    <div class="btn-group" role="group" aria-label="名字和删除按钮">
        <a class="btn btn-sm btn-info" href="#">{{ taskname }}</a>
        <a class="btn btn-sm btn-info" href="{{ url_for('.plan_unbind', taskname=taskname, plan_id=plan_id) }}">x</a>
    </div>
    {% endfor %}
</p>
{% endif %}
{% endblock %}